package com.freshmarket.fresh.mapper;

import com.freshmarket.fresh.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("select id,password from user where username=#{username}")
    User selectByUsername(String username);
    @Select("select * from user where number=#{number}")
    User selectByNumber(String number);
    @Insert("insert into user values(null,#{username},#{password},#{number})")
    void insert(User user);
}
